package zyc.service.impl;

import zyc.dao.BookDao;
import zyc.dao.impl.BookDaoImpl;
import zyc.pojo.Book;
import zyc.service.BookService;

import java.util.List;

/**
 * @description:
 * @author: ZhaoYicong
 * @date: Created in 2020/7/17 18:03
 * @version: v1.0
 * @modified By:
 */
public class BookServiceImpl implements BookService {

    private BookDao bookDao = new BookDaoImpl();
    @Override
    public void addBook(Book book) { bookDao.addBook(book); }
    @Override
    public void deleteBookById(Integer id) { bookDao.deleteBookById(id); }
    @Override
    public void updateBook(Book book) { bookDao.updateBook(book); }
    @Override
    public Book queryBookById(Integer id) { return bookDao.queryBookById(id); }
    @Override
    public List<Book> queryBooks() { return bookDao.queryBooks(); }

}
